package level.editor.tool.tile;

import javax.swing.BorderFactory;
import javax.swing.Icon;
import javax.swing.JButton;

import level.state.Tile;

public class ToolTileButton extends JButton
{
	private Tile tile;
	
	public ToolTileButton(Icon icon)
	{
		super("", icon);
		setBorderPainted(false);
		setContentAreaFilled(false);
		tile = new Tile();
		setFocusPainted(false);
		setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
	}
	
	public void setSx(int x)
	{
		tile.setSx(x);
	}

	public void setSy(int y)
	{
		tile.setSy(y);
	}

	public void setIconPath(String fileName)
	{
		tile.setIconPath(fileName);
	}
	
	public Tile getTile()
	{
		return tile;
	}
}
